<?php

error_reporting(E_ALL);
ini_set('display_errors', '1');

$a = session_id();if(empty($a)) session_start();
include_once dirname(__FILE__).'/class/functions.php';
$logat = is_logat();
//echo " logat $logat";
//print_r($_SESSION);
//echo basename(dirname(__FILE__)) . "<br/>";
//echo basename(__FILE__) . "<br/>";
//echo $_SERVER['HTTP_HOST']. "<br/>";
//echo $_SERVER['REQUEST_URI'];
            ?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="icon" href="favicon.jpg" type="image/gif" sizes="16x16" /> 
        <link rel="stylesheet" type="text/css" href="./style/style.css" />
        <title></title>
    </head>
    <body>
        <? 
        if($logat){
        header_out();
        $_SESSION["root_path"]=substr($_SERVER['REQUEST_URI'],0,strrpos($_SERVER['REQUEST_URI'],'/')).'/';
        }
        else
        {
            header_login();
            
            }

                    ?>
        <div id="content">
            <div id="content_inside">
                    <div id="content_inside_sidebar">
                        <ul>
                            <li><a href ="#" id="show_home"> Home</a><br />
                            </li><li><a href ="#" id="show_tel"> Carte Telefon</a><br /></li>
                            <li><a href ="#" id="show_rezerv"> Rezervari</a><br /></li>    
                            <li><a href ="#" id="show_down"> Downloads</a><br /></li> 
                                           
                         </ul>
                                 
                    </div>
            <div id="content_inside_main">
                <div id="home_stuff">
				<h1>Important</h1>
				<p>Licensed under the <a href="http://creativecommons.org/licenses/by/2.5/">Creative Commons Attribution 2.5</a>. I have left the actual text design style very basic for you to add your own text / header / quotes / list etc. styles yourself.</p>
				<h1>header two</h1>
				<p>Volutpat at varius sed sollicitudin et, arcu. Vivamus viverra. Nullam turpis. Vestibulum sed etiam. Lorem ipsum sit amet dolore. Nulla facilisi. Sed tortor. Aenean felis. Quisque eros. Cras lobortis commodo metus. Vestibulum vel purus. In eget odio in sapien adipiscing blandit. Quisque augue tortor, facilisis sit amet, aliquam, suscipit vitae, cursus sed, arcu lorem ipsum dolor sit amet. Fermentum at, varius pretium, elit. Mauris egestas scelerisque nunc. Mauris non ligula quis wisi laoreet malesuada. In commodo. Maecenas lobortis cursus dolor.</p>
				<h1>header three</h1>
				<p>Volutpat at varius sed sollicitudin et, arcu. Vivamus viverra. Nullam turpis. Vestibulum sed etiam. Lorem ipsum sit amet dolore. Nulla facilisi. Sed tortor. Aenean felis. Quisque eros. Cras lobortis commodo metus. Vestibulum vel purus. In eget odio in sapien adipiscing blandit.</p>	
				<p>Volutpat at varius sed sollicitudin et, arcu. Vivamus viverra. Nullam turpis. Vestibulum sed etiam. Lorem ipsum sit amet dolore. Nulla facilisi. Sed tortor. Aenean felis. Quisque eros. Cras lobortis commodo metus. Vestibulum vel purus. In eget odio in sapien adipiscing blandit.</p>	
				<p>Quisque augue tortor, facilisis sit amet, aliquam, suscipit vitae, cursus sed, arcu lorem ipsum dolor sit amet. Fermentum at, varius pretium, elit. Mauris egestas scelerisque nunc. Mauris non ligula quis wisi laoreet malesuada. In commodo. Maecenas lobortis cursus dolor.</p>
				<p>Quisque augue tortor, facilisis sit amet, aliquam, suscipit vitae, cursus sed, arcu lorem ipsum dolor sit amet. Fermentum at, varius pretium, elit. Mauris egestas scelerisque nunc. Mauris non ligula quis wisi laoreet malesuada. In commodo. Maecenas lobortis cursus dolor.</p>
                </div>
                <div id="telefon_stuff" style="display: none">
                    Cauta:<input type="text" id="cauta_tel" /><br/>
                    <div id="list_tel">
                        <?    list_tel(); ?>
                    </div>

                </div>
                
                <div id="rezervari_stuff" style="display: none">
                   <?
                            $search="<div id='search_rez'>";
                            $perioade=  pt_rezervari("perioade", "perioada");
                            $sali=  pt_rezervari("sali", "sala");
                            $categorii= pt_rezervari("categorii", "categoria");
                            $anii=pt_rezervari("ani", "an");
                            $search.="</div>";
                                             
                   ?>
                    <form  method=post>
                    <?
                    echo $perioade;
                    echo $sali;
                    
                    ?>
                    Motiv: <input type="text" name="motiv" value=""/> 
                    Data: <input type="text"  id="datepicker" name="data" value=""/> <br/>
                    <a href="#" class="grey-button pcb"><span id="rez_submit">Submit</span></a> <br/> <br/>
                         </form>
                    <form>
                    <input type="radio" name="mod" class="sel_mod2" value="0" /> Cautare<br />
                    <input type="radio" name="mod" class="sel_mod2" value="1" /> Adaugare<br />
                    </form>  
                     <hr /><br />
                     <div id="rez_se_res">
                                           
                         <div>      <?php  echo list_rez(); ?>             </div>
                      </div>

                 </div>
                
                <div id="download_stuff" style="display: none">
                    <form method="post">
                    <?
                    echo $categorii;
                    echo $anii;
                    
                    ?>
                    Cauta: <input type="text" name="keyw" value=""/> 
                    <a href="#" class="grey-button pcb"><span id="down_submit"> Submit</span></a> <br/> <br/>
                    </form>
                    
                    <div id="list_down">
                        <? echo list_downloads(); ?>
                        
                    </div>
                    
                </div>
                <div id="testJ">
                    TESTEAZA JSON
                </div>
        </div>

        
<? footer(); ?>        
    </body>
    
    
    <script type="text/javascript">
        setSlider($('#scroll-pane'));
     </script>
</html>
